
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>开始写作吧 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../开发者指南.html" />
    
    
    <link rel="prev" href="config.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../开源组件实现.html">
            
                <a href="../开源组件实现.html">
            
                    
                    开源组件实现
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../mvc/MVC框架实现篇.html">
            
                <a href="../mvc/MVC框架实现篇.html">
            
                    
                    MVC框架实现篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.1" data-path="../mvc/">
            
                <a href="../mvc/">
            
                    
                    MVC框架实现篇
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2" data-path="../mvc/1.plan.html">
            
                <a href="../mvc/1.plan.html">
            
                    
                    项目规划
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.3" data-path="../mvc/2.route.html">
            
                <a href="../mvc/2.route.html">
            
                    
                    路由设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.4" data-path="../mvc/3.controller.html">
            
                <a href="../mvc/3.controller.html">
            
                    
                    控制器设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.5" data-path="../mvc/4.config.html">
            
                <a href="../mvc/4.config.html">
            
                    
                    配置设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.6" data-path="../mvc/5.view.html">
            
                <a href="../mvc/5.view.html">
            
                    
                    视图设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.7" data-path="../mvc/6.dbutil.html">
            
                <a href="../mvc/6.dbutil.html">
            
                    
                    数据库操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.8" data-path="../mvc/7.crud.html">
            
                <a href="../mvc/7.crud.html">
            
                    
                    增删改查
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../ioc/IOC容器实现篇.html">
            
                <a href="../ioc/IOC容器实现篇.html">
            
                    
                    IOC容器实现篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.1" data-path="../ioc/1.concept.html">
            
                <a href="../ioc/1.concept.html">
            
                    
                    IOC的概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.2" data-path="../ioc/2.spring.html">
            
                <a href="../ioc/2.spring.html">
            
                    
                    Spring中怎么用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.3" data-path="../ioc/3.myioc.html">
            
                <a href="../ioc/3.myioc.html">
            
                    
                    设计一个IOC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.4" data-path="../ioc/4.principle.html">
            
                <a href="../ioc/4.principle.html">
            
                    
                    原理分析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../设计模式系列.html">
            
                <a href="../设计模式系列.html">
            
                    
                    设计模式系列
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../designpatterns/singleton.html">
            
                <a href="../designpatterns/singleton.html">
            
                    
                    如何正确地写出单例模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../designpatterns/proxy.html">
            
                <a href="../designpatterns/proxy.html">
            
                    
                    代理模式剖析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../designpatterns/strategy.html">
            
                <a href="../designpatterns/strategy.html">
            
                    
                    什么是策略模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../Java8系列.html">
            
                <a href="../Java8系列.html">
            
                    
                    Java8系列
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../java8/java8-guide.html">
            
                <a href="../java8/java8-guide.html">
            
                    
                    Java8简明教程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../java8/foreach.html">
            
                <a href="../java8/foreach.html">
            
                    
                    Java8 Foreach
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Hexo搭建博客.html">
            
                <a href="../Hexo搭建博客.html">
            
                    
                    Hexo搭建博客
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="hello.html">
            
                <a href="hello.html">
            
                    
                    分分钟部署一个Hexo环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="config.html">
            
                <a href="config.html">
            
                    
                    各种配置详解
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5.3" data-path="writing.html">
            
                <a href="writing.html">
            
                    
                    开始写作吧
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../开发者指南.html">
            
                <a href="../开发者指南.html">
            
                    
                    开发者指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../git/guide.html">
            
                <a href="../git/guide.html">
            
                    
                    git - 简明指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" >
            
                <a target="_blank" href="https://waylau.gitbooks.io/jersey-2-user-guide/content/index.html">
            
                    
                    Jersey-2.x用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" >
            
                <a target="_blank" href="https://waylau.gitbooks.io/rest-in-action/content/">
            
                    
                    REST 实战
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" >
            
                <a target="_blank" href="https://github.com/waylau/servlet-3.1-specification">
            
                    
                    Java Servlet 3.1 规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" >
            
                <a target="_blank" href="http://mybatis.github.io/mybatis-3/zh/index.html">
            
                    
                    MyBatis中文指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" >
            
                <a target="_blank" href="https://github.com/waylau/apache-shiro-1.2.x-reference">
            
                    
                    Apache Shiro 用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" >
            
                <a target="_blank" href="https://github.com/qibaoguang/Spring-Boot-Reference-Guide/blob/master/SUMMARY.md">
            
                    
                    Spring Boot参考指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" >
            
                <a target="_blank" href="https://github.com/waylau/netty-4-user-guide/blob/master/SUMMARY.md">
            
                    
                    Netty4 用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="../user_guide/google-java8-guide.html">
            
                <a href="../user_guide/google-java8-guide.html">
            
                    
                    Google Java编程风格指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../运维相关.html">
            
                <a href="../运维相关.html">
            
                    
                    运维相关
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../web/test_tool.html">
            
                <a href="../web/test_tool.html">
            
                    
                    Web性能测试工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" >
            
                <a target="_blank" href="https://github.com/judasn/Linux-Tutorial">
            
                    
                    Java 程序员眼中的 Linux
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../learn_server/">
            
                <a href="../learn_server/">
            
                    
                    写给java开发的运维笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../经典文章.html">
            
                <a href="../经典文章.html">
            
                    
                    经典文章
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../articles/request_message.html">
            
                <a href="../articles/request_message.html">
            
                    
                    HTTP请求报文解剖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../articles/software_architecture_patterns.html">
            
                <a href="../articles/software_architecture_patterns.html">
            
                    
                    软件架构模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../articles/electrical-business-architecture.html">
            
                <a href="../articles/electrical-business-architecture.html">
            
                    
                    电商网站架构案例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../服务器相关.html">
            
                <a href="../服务器相关.html">
            
                    
                    服务器/域名/SSL证书
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" >
            
                <a target="_blank" href="https://domainr.com">
            
                    
                    可用域名
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" >
            
                <a target="_blank" href="http://hk.hostsir.com/Affiliates/i/d/976">
            
                    
                    优惠域名
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" >
            
                <a target="_blank" href="http://www.vultr.com/?ref=6886447">
            
                    
                    vultr VPS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" >
            
                <a target="_blank" href="https://sshdropbear.net/">
            
                    
                    免费VPN/SSH服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.5" >
            
                <a target="_blank" href="http://get.ishadow.website/">
            
                    
                    免费SS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.6" >
            
                <span>
            
                    
                    1小时免费VPN
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.7" >
            
                <a target="_blank" href="https://saki.ssl.do/aff.php?aff=11">
            
                    
                    SSL.DO
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.8" >
            
                <a target="_blank" href="http://api.hostinger.com.hk/redir/22018310">
            
                    
                    免费虚拟主机
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../实用工具.html">
            
                <a href="../实用工具.html">
            
                    
                    实用工具/API
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" >
            
                <a target="_blank" href="https://tinypng.com/">
            
                    
                    PNG图片无损压缩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" >
            
                <a target="_blank" href="http://tool.c7sky.com/image-watermark/">
            
                    
                    在线给图片加水印
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" >
            
                <a target="_blank" href="http://tool.c7sky.com/password/">
            
                    
                    随机密码生成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" >
            
                <a target="_blank" href="https://randomuser.me/">
            
                    
                    随机头像生成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" >
            
                <a target="_blank" href="http://tool.c7sky.com/tcleaner/">
            
                    
                    微博一键清理工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.6" >
            
                <a target="_blank" href="http://csscompressor.com/">
            
                    
                    CSS压缩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.7" >
            
                <a target="_blank" href="http://www.atool.org/">
            
                    
                    在线工具
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >开始写作吧</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <p>&#x4E0A;&#x4E00;&#x8282;&#xFF1A;<a href="config.html">&#x5404;&#x79CD;&#x914D;&#x7F6E;&#x8BE6;&#x89E3;</a></p>
<h1 id="1-&#x5F00;&#x59CB;&#x5199;&#x4F5C;">1. &#x5F00;&#x59CB;&#x5199;&#x4F5C;</h1>
<p>&#x4F7F;&#x7528;&#x4E0B;&#x9762;&#x7684;&#x547D;&#x4EE4;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x65B0;&#x6587;&#x7AE0;&#xFF1A;</p>
<pre><code class="lang-bash">$ hexo new [layout] &lt;title&gt;
</code></pre>
<p>&#x9ED8;&#x8BA4;&#x7684;&#x6587;&#x7AE0;&#x5E03;&#x5C40;&#x662F;<code>post</code>&#xFF0C;&#x5F53;&#x7136;&#x4F60;&#x53EF;&#x7528;&#x63D0;&#x4F9B;&#x81EA;&#x5DF1;&#x7684;&#x5E03;&#x5C40;&#x6587;&#x4EF6;&#x3002;&#x4F60;&#x53EF;&#x4EE5;&#x7F16;&#x8F91; <code>_config.yml</code> &#x4FEE;&#x6539;&#x9ED8;&#x8BA4;&#x5E03;&#x5C40;&#x3002;</p>
<h3 id="layout&#xFF08;&#x5E03;&#x5C40;&#xFF09;">Layout&#xFF08;&#x5E03;&#x5C40;&#xFF09;</h3>
<p>Hexo&#x63D0;&#x4F9B;&#x4E86;3&#x4E2A;&#x9ED8;&#x8BA4;&#x5E03;&#x5C40;&#xFF1A;<code>post</code>&#x3001;<code>page</code> &#x548C; <code>draft</code>&#x3002;&#x4E0D;&#x540C;&#x5E03;&#x5C40;&#x7684;&#x6587;&#x7AE0;&#x4F1A;&#x88AB;&#x4FDD;&#x5B58;&#x5230;&#x4E0D;&#x540C;&#x7684;&#x76EE;&#x5F55;&#xFF0C;&#x8FD9;&#x53D6;&#x51B3;&#x4E8E;&#x5B83;&#x7684;&#x5E03;&#x5C40;&#x7C7B;&#x578B;&#x3002;
&#x81EA;&#x5B9A;&#x4E49;&#x5E03;&#x5C40;&#x4FDD;&#x5B58;&#x5230; <code>source/_posts</code> &#x6587;&#x4EF6;&#x5939;&#x3002;</p>
<table>
<thead>
<tr>
<th>&#x5E03;&#x5C40;</th>
<th>&#x8DEF;&#x5F84;</th>
</tr>
</thead>
<tbody>
<tr>
<td>post</td>
<td>source/_posts</td>
</tr>
<tr>
<td>page</td>
<td>source</td>
</tr>
<tr>
<td>draft</td>
<td>source/_drafts</td>
</tr>
</tbody>
</table>
<blockquote>
<h3 id="&#x4E0D;&#x5904;&#x7406;&#x6587;&#x7AE0;">&#x4E0D;&#x5904;&#x7406;&#x6587;&#x7AE0;!</h3>
<p>&#x5982;&#x679C;&#x4F60;&#x4E0D;&#x5E0C;&#x671B;&#x4F60;&#x7684;&#x6587;&#x7AE0;&#x88AB;&#x5904;&#x7406;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x8BBE;&#x7F6E; <code>layout:false</code>&#x3002;</p>
</blockquote>
<h3 id="filename&#xFF08;&#x6587;&#x4EF6;&#x540D;&#xFF09;">Filename&#xFF08;&#x6587;&#x4EF6;&#x540D;&#xFF09;</h3>
<p>&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;hexo&#x4F7F;&#x7528;&#x6587;&#x7AE0;&#x6807;&#x9898;&#x4F5C;&#x4E3A;&#x6587;&#x4EF6;&#x540D;&#x3002;
&#x4F60;&#x53EF;&#x4EE5;&#x7F16;&#x8F91; <code>_config.yml</code> &#x7684; <code>new_post_name</code> &#x8BBE;&#x7F6E;&#x6539;&#x53D8;&#x9ED8;&#x8BA4;&#x7684;&#x6587;&#x4EF6;&#x540D;&#x3002;
&#x4F8B;&#x5982; <code>:year-:month-:day-:title.md</code> &#x5C06;&#x524D;&#x7F00;&#x7684;&#x6587;&#x4EF6;&#x540D;&#x540E;&#x521B;&#x5EFA;&#x65E5;&#x671F;&#x3002;&#x4F60;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x4EE5;&#x4E0B;&#x7684;&#x5360;&#x4F4D;&#x7B26;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x5360;&#x4F4D;&#x7B26;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>:title</code></td>
<td>&#x6587;&#x7AE0;&#x6807;&#x9898;</td>
</tr>
<tr>
<td><code>:year</code></td>
<td>&#x521B;&#x5EFA;&#x5E74;&#x4EFD;</td>
</tr>
<tr>
<td><code>:month</code></td>
<td>&#x6708;&#x4EFD;&#xFF0C;&#x5982;4&#x6708;&#x4E3A;<code>04</code></td>
</tr>
<tr>
<td><code>:i_month</code></td>
<td>&#x6708;&#x4EFD;&#xFF0C;&#x5355;&#x6570;&#x5B57;&#xFF0C;&#x6BD4;&#x5982;4&#x6708;&#x5C31;&#x662F;<code>4</code></td>
</tr>
<tr>
<td><code>:day</code></td>
<td>&#x65E5;&#x671F;</td>
</tr>
<tr>
<td><code>:i_day</code></td>
<td>&#x65E5;&#x671F;</td>
</tr>
</tbody>
</table>
<h3 id="drafts&#xFF08;&#x8349;&#x7A3F;&#xFF09;">Drafts&#xFF08;&#x8349;&#x7A3F;&#xFF09;</h3>
<p>&#x524D;&#x9762;hexo&#x63D0;&#x5230;&#x4E00;&#x4E2A;&#x7279;&#x6B8A;&#x7684;&#x5E03;&#x5C40;&#xFF1A;<code>draft</code>&#x3002;
&#x8FD9;&#x79CD;&#x5E03;&#x5C40;&#x7684;&#x5E16;&#x5B50;&#x4FDD;&#x5B58;&#x5230; <code>source/_drafts</code> &#x6587;&#x4EF6;&#x5939;&#x3002;&#x4F60;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <code>publish</code> &#x547D;&#x4EE4;&#x79FB;&#x52A8;&#x8349;&#x7A3F;&#x5230; <code>source/_posts</code> &#x6587;&#x4EF6;&#x5939;&#x3002;
&#x8FD9;&#x4E2A;&#x547D;&#x4EE4;&#x7C7B;&#x4F3C;&#x4E8E;&#x4F60;&#x4F7F;&#x7528;&#x4E86; <code>new</code>&#x3002;</p>
<pre><code class="lang-bash">$ hexo publish [layout] &lt;title&gt;
</code></pre>
<p>&#x8349;&#x7A3F;&#x9ED8;&#x8BA4;&#x4E0D;&#x663E;&#x793A;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x6DFB;&#x52A0; <code>--draft</code> &#x9009;&#x9879;&#x6216;&#x8005;&#x8BBE;&#x7F6E; <code>_config.yml</code> &#x4E2D;&#x7684; <code>render_drafts</code> &#x4F7F;hexo&#x663E;&#x793A;&#x8349;&#x7A3F;&#x3002;</p>
<h3 id="scaffolds&#xFF08;&#x6A21;&#x7248;&#xFF09;">Scaffolds&#xFF08;&#x6A21;&#x7248;&#xFF09;</h3>
<p>&#x5F53;&#x521B;&#x5EFA;&#x4E00;&#x7BC7;&#x6587;&#x7AE0;,Hexo&#x5C06;&#x6784;&#x5EFA;&#x57FA;&#x4E8E; <code>scaffolds</code> &#x6587;&#x4EF6;&#x5939;&#x4E2D;&#x7684;&#x76F8;&#x5E94;&#x6587;&#x4EF6;&#x3002;&#x4F8B;&#x5982;:</p>
<pre><code class="lang-bash">$ hexo new photo <span class="hljs-string">&quot;My Gallery&quot;</span>
</code></pre>
<p>&#x5F53;&#x4F60;&#x8FD0;&#x884C;&#x8FD9;&#x4E2A;&#x547D;&#x4EE4;&#xFF0C;&#x8981;&#x5C1D;&#x8BD5;&#x5728; <code>scaffolds</code> &#x6587;&#x4EF6;&#x5939;&#x4E0B;&#x627E;&#x5230;&#x6587;&#x4EF6;&#x540D;&#x4E3A; <code>photo.md</code> &#x7684;&#x6A21;&#x677F;&#x6587;&#x4EF6;&#x3002;&#x4E0B;&#x9762;&#x5360;&#x4F4D;&#x7B26;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x6A21;&#x677F;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x5360;&#x4F4D;&#x7B26;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>layout</code></td>
<td>&#x5E03;&#x5C40;</td>
</tr>
<tr>
<td><code>title</code></td>
<td>&#x6587;&#x7AE0;&#x6807;&#x9898;</td>
</tr>
<tr>
<td><code>date</code></td>
<td>&#x53D1;&#x5E03;&#x65F6;&#x95F4;</td>
</tr>
</tbody>
</table>
<h1 id="2-&#x524D;&#x7F6E;&#x7533;&#x660E;">2. &#x524D;&#x7F6E;&#x7533;&#x660E;</h1>
<p>&#x524D;&#x7F6E;&#x7533;&#x660E;&#x7684;&#x610F;&#x601D;&#x662F;&#x5199;&#x5728;&#x6587;&#x7AE0;&#x524D;&#x9762;&#x7684;&#x4E00;&#x5757;&#x5185;&#x5BB9;&#xFF0C;&#x4E3A;&#x4E86;&#x5BF9;&#x6587;&#x7AE0;&#x8FDB;&#x884C;&#x67D0;&#x4E9B;&#x8BBE;&#x7F6E;&#x3002;&#x5B83;&#x6709;&#x4E24;&#x79CD;&#x4E66;&#x5199;&#x65B9;&#x5F0F;&#xFF1A;</p>
<p><strong>YAML&#x65B9;&#x5F0F;&#xFF0C;&#x4EE5;&#x4E09;&#x77ED;&#x7EBF;&#x7ED3;&#x675F;</strong></p>
<pre><code class="lang-bash">title: Hello World
date: 2013/7/13 20:46:25
---
</code></pre>
<p><strong>JSON&#x65B9;&#x5F0F;&#xFF0C;&#x4EE5;&#x4E09;&#x5206;&#x53F7;&#x7ED3;&#x675F;</strong></p>
<pre><code class="lang-bash"><span class="hljs-string">&quot;title&quot;</span>: <span class="hljs-string">&quot;Hello World&quot;</span>,
<span class="hljs-string">&quot;date&quot;</span>: <span class="hljs-string">&quot;2013/7/13 20:46:25&quot;</span>
;;;
</code></pre>
<h3 id="&#x8BBE;&#x7F6E;&#x4EE5;&#x53CA;&#x9ED8;&#x8BA4;&#x503C;">&#x8BBE;&#x7F6E;&#x4EE5;&#x53CA;&#x9ED8;&#x8BA4;&#x503C;</h3>
<table>
<thead>
<tr>
<th>&#x8BBE;&#x7F6E;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>layout</code></td>
<td>&#x5E03;&#x5C40;</td>
</tr>
<tr>
<td><code>title</code></td>
<td>&#x6587;&#x7AE0;&#x6807;&#x9898;</td>
</tr>
<tr>
<td><code>date</code></td>
<td>&#x53D1;&#x5E03;&#x65F6;&#x95F4;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x6587;&#x4EF6;&#x521B;&#x5EFA;&#x65F6;&#x95F4;</td>
</tr>
<tr>
<td><code>updated</code></td>
<td>&#x6587;&#x4EF6;&#x4FEE;&#x6539;&#x65F6;&#x95F4;</td>
</tr>
<tr>
<td><code>comments</code></td>
<td>&#x662F;&#x5426;&#x5F00;&#x542F;&#x8BC4;&#x8BBA;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;true</td>
</tr>
<tr>
<td><code>tags</code></td>
<td>&#x6587;&#x7AE0;&#x6807;&#x7B7E;</td>
</tr>
<tr>
<td><code>categories</code></td>
<td>&#x6587;&#x7AE0;&#x6240;&#x5C5E;&#x5206;&#x7C7B;</td>
</tr>
<tr>
<td><code>permalink</code></td>
<td>&#x6587;&#x7AE0;&#x6C38;&#x4E45;&#x94FE;&#x63A5;&#xFF0C;&#x4E00;&#x822C;&#x4E0D;&#x7528;&#x5199;&#xFF0C;&#x9ED8;&#x8BA4;&#x5C31;&#x884C;</td>
</tr>
</tbody>
</table>
<p><strong>&#x5206;&#x7C7B; &amp; &#x6807;&#x7B7E;</strong></p>
<p>&#x5206;&#x7C7B;&#x548C;&#x6807;&#x7B7E;&#x53EA;&#x652F;&#x6301;&#x5728;&#x6587;&#x7AE0;&#x3002;&#x5206;&#x7C7B;&#x53EF;&#x80FD;&#x4F1A;&#x6709;&#x591A;&#x5C42;&#x7EA7;&#x522B;&#x3002;
&#x4E0B;&#x9762;&#x662F;&#x4E00;&#x4E2A;&#x4F8B;&#x5B50;&#xFF1A;</p>
<pre><code class="lang-bash">categories:
- Sports
- Baseball
tags:
- Injury
- Fight
- Shocking
</code></pre>
<h1 id="3-&#x6807;&#x7B7E;&#x63D2;&#x4EF6;">3. &#x6807;&#x7B7E;&#x63D2;&#x4EF6;</h1>
<p>&#x8FD9;&#x91CC;&#x7684;&#x6807;&#x7B7E;&#x63D2;&#x4EF6;&#x4E0D;&#x662F;&#x6587;&#x7AE0;&#x4E2D;&#x7684;&#x6807;&#x7B7E;&#xFF0C;&#x5B83;&#x53EF;&#x4EE5;&#x5E2E;&#x52A9;&#x4F60;&#x5728;&#x6587;&#x7AE0;&#x4E2D;&#x63D2;&#x5165;&#x7279;&#x5B9A;&#x7684;&#x4E00;&#x4E9B;&#x5185;&#x5BB9;&#x3002;</p>
<h3 id="block-quote&#xFF08;&#x5757;&#x5F15;&#x7528;&#xFF09;">Block Quote&#xFF08;&#x5757;&#x5F15;&#x7528;&#xFF09;</h3>
<p>&#x63D2;&#x5165;&#x5F15;&#x53F7;&#x4E0E;&#x4F5C;&#x8005;&#x3001;&#x6765;&#x6E90;&#x548C;&#x6587;&#x7AE0;&#x7684;&#x6807;&#x9898;&#x3002;
<strong>&#x522B;&#x540D;</strong>&#xFF1A;quote</p>
<pre><code class="lang-bash">{% blockquote [author[, <span class="hljs-built_in">source</span>]] [link] [<span class="hljs-built_in">source</span>_link_title] %}
content
{% endblockquote %}
</code></pre>
<h3 id="&#x793A;&#x4F8B;">&#x793A;&#x4F8B;</h3>
<p><strong>&#x6CA1;&#x6709;&#x4EFB;&#x4F55;&#x53C2;&#x6570;&#xFF0C;&#x7EAF;&#x8F93;&#x51FA;blockquote</strong></p>
<pre><code class="lang-bash">{% blockquote %}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque hendrerit lacus ut purus iaculis feugiat. Sed nec tempor elit, quis aliquam neque. Curabitur sed diam eget dolor fermentum semper at eu lorem.
{% endblockquote %}
</code></pre>
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque hendrerit lacus ut purus iaculis feugiat. Sed nec tempor elit, quis aliquam neque. Curabitur sed diam eget dolor fermentum semper at eu lorem.</p>
</blockquote>
<p><strong>&#x5F15;&#x7528;&#x4E00;&#x672C;&#x4E66;</strong></p>
<pre><code class="lang-bash">{% blockquote David Levithan, Wide Awake %}
Do not just seek happiness <span class="hljs-keyword">for</span> yourself. Seek happiness <span class="hljs-keyword">for</span> all. Through kindness. Through mercy.
{% endblockquote %}
</code></pre>
<blockquote>
<p>Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy.
<strong><em>David Levithan</em></strong>&#x2014;&#x2014;<em>Wide Awake</em></p>
</blockquote>
<p><strong>&#x5F15;&#x7528;&#x81EA;Twitter</strong></p>
<pre><code class="lang-bash">{% blockquote @DevDocs https://twitter.com/devdocs/status/356095192085962752 %}
NEW: DevDocs now comes with syntax highlighting. http://devdocs.io
{% endblockquote %}
</code></pre>
<blockquote>
<p>NEW: DevDocs now comes with syntax highlighting. <a href="http://devdocs.io" target="_blank">http://devdocs.io</a>
<strong><em>@DevDocs</em></strong>&#x2014;&#x2014;<em><a href="https://twitter.com/devdocs/status/356095192085962752" target="_blank">twitter.com/devdocs/status/356095192085962752</a></em></p>
</blockquote>
<p><strong>&#x5F15;&#x7528;&#x7F51;&#x7EDC;&#x4E0A;&#x4E00;&#x7BC7;&#x6587;&#x7AE0;</strong></p>
<pre><code class="lang-bash">{% blockquote Seth Godin http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html Welcome to Island Marketing %}
Every interaction is both precious and an opportunity to delight.
{% endblockquote %}
</code></pre>
<blockquote>
<p>Every interaction is both precious and an opportunity to delight.</p>
<p><strong><em>Seth Godin</em></strong>&#x2014;&#x2014;<em><a href="http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html" target="_blank">Welcome to Island Marketing</a></em></p>
</blockquote>
<h3 id="&#x4EE3;&#x7801;&#x5757;">&#x4EE3;&#x7801;&#x5757;</h3>
<p>&#x6587;&#x7AE0;&#x4E2D;&#x63D2;&#x5165;&#x4EE3;&#x7801;&#x5757;
<strong>&#x522B;&#x540D;</strong>&#xFF1A;code</p>
<pre><code class="lang-bash">{% codeblock [title] [lang:language] [url] [link text] %}
code snippet
{% endcodeblock %}
</code></pre>
<h3 id="&#x793A;&#x4F8B;">&#x793A;&#x4F8B;</h3>
<p><strong>&#x666E;&#x901A;&#x4EE3;&#x7801;&#x5757;</strong></p>
<pre><code class="lang-bash">{% codeblock %}
alert(<span class="hljs-string">&apos;Hello World!&apos;</span>);
{% endcodeblock %}
</code></pre>
<pre><code class="lang-bash">alert(<span class="hljs-string">&apos;Hello World!&apos;</span>);
</code></pre>
<p><strong>&#x6307;&#x5B9A;&#x8BED;&#x8A00;</strong></p>
<pre><code class="lang-bash">{% codeblock lang:objc %}
[rectangle <span class="hljs-built_in">set</span>X: 10 y: 10 width: 20 height: 20];
{% endcodeblock %}
</code></pre>
<pre><code class="lang-objc">[rectangle setX: <span class="hljs-number">10</span> y: <span class="hljs-number">10</span> width: <span class="hljs-number">20</span> height: <span class="hljs-number">20</span>];
</code></pre>
<p><strong>Gist</strong></p>
<pre><code class="lang-bash">{% gist gist_id [filename] %}
</code></pre>
<p><strong>iframe</strong></p>
<pre><code class="lang-bash">{% iframe url [width] [height] %}
</code></pre>
<p><strong>Image</strong></p>
<pre><code class="lang-bash">{% img [class names] /path/to/image [width] [height] [title text [alt text]] %}
</code></pre>
<p><strong>Link</strong></p>
<pre><code class="lang-bash">{% link text url [external] [title] %}
</code></pre>
<h3 id="&#x66F4;&#x591A;"><a href="https://hexo.io/docs/tag-plugins.html" target="_blank">&#x66F4;&#x591A;</a>...</h3>
<h1 id="4-&#x8D44;&#x6E90;&#x76EE;&#x5F55;x">4. &#x8D44;&#x6E90;&#x76EE;&#x5F55;x</h1>
<p>&#x8D44;&#x6E90;&#x662F;&#x975E;&#x6587;&#x7AE0;&#x7684;&#x6587;&#x4EF6;&#xFF0C;&#x5728;<code>source</code>&#x6587;&#x4EF6;&#x5939;&#x4E2D;&#xFF0C;&#x5982;&#x56FE;&#x7247;&#x3001;css&#x3001;javascript&#x6587;&#x4EF6;&#x7B49;&#x3002;
Hexo&#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x4E2A;&#x66F4;&#x52A0;&#x65B9;&#x4FBF;&#x7684;&#x65B9;&#x5F0F;&#x6765;&#x7BA1;&#x7406;&#x8D44;&#x6E90;&#x3002;&#x4F60;&#x53EF;&#x4EE5;&#x4FEE;&#x6539; <code>post_asset_folder</code> &#x8BBE;&#x7F6E;&#x3002;</p>
<pre><code class="lang-bash">post_asset_folder: <span class="hljs-literal">true</span>
</code></pre>
<p>&#x4E00;&#x65E6; <code>post_asset_folder</code> &#x8BBE;&#x7F6E;&#x542F;&#x7528;,&#x5728;&#x4F60;&#x521B;&#x5EFA;&#x6587;&#x7AE0;&#x7684;&#x65F6;&#x5019;&#xFF0C;Hexo&#x4F1A;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x540C;&#x540D;&#x76EE;&#x5F55;&#xFF0C;
&#x4F60;&#x53EF;&#x4EE5;&#x5C06;&#x8BE5;&#x6587;&#x7AE0;&#x5173;&#x8054;&#x7684;&#x8D44;&#x6E90;&#x5168;&#x90E8;&#x653E;&#x5230;&#x8BE5;&#x76EE;&#x5F55;&#x4E0B;&#x3002;&#x8FD9;&#x6837;&#x5C31;&#x53EF;&#x4EE5;&#x66F4;&#x52A0;&#x65B9;&#x4FBF;&#x7684;&#x4F7F;&#x7528;&#x5B83;&#x4EEC;&#x4E86;&#x3002;</p>
<h3 id="&#x6807;&#x7B7E;&#x63D2;&#x4EF6;&#x4F7F;&#x7528;">&#x6807;&#x7B7E;&#x63D2;&#x4EF6;&#x4F7F;&#x7528;</h3>
<pre><code class="lang-bash">{% asset_path slug %}
{% asset_img slug [title] %}
{% asset_link slug [title] %}
</code></pre>
<h1 id="5-&#x6570;&#x636E;&#x6587;&#x4EF6;">5. &#x6570;&#x636E;&#x6587;&#x4EF6;</h1>
<p>&#x6709;&#x65F6;&#xFF0C;&#x4F60;&#x53EF;&#x80FD;&#x4F1A;&#x4F7F;&#x7528;&#x4E00;&#x4E9B;&#x4E0D;&#x5728;post&#x4E2D;&#x7684;&#x6A21;&#x7248;&#x6570;&#x636E;&#xFF0C;&#x6216;&#x8005;&#x4F60;&#x60F3;&#x590D;&#x7528;&#x8FD9;&#x4E9B;&#x6570;&#x636E;&#xFF0C;
&#x90A3;&#x4E48;&#x4F60;&#x53EF;&#x4EE5;&#x8BD5;&#x7528;&#x4E00;&#x4E0B;Hexo3&#x4E2D;&#x7684;&#x300E;Data files&#x300F;&#x529F;&#x80FD;&#x3002;&#x8FD9;&#x4E2A;&#x7279;&#x6027;&#x52A0;&#x8F7D; <code>source/_data</code> &#x76EE;&#x5F55;&#x4E2D;&#x7684;YAML&#x6216;&#x8005;JSON&#x6587;&#x4EF6;&#xFF0C;&#x4ECE;&#x800C;&#x7528;&#x5230;&#x4F60;&#x7684;&#x7F51;&#x7AD9;&#x4E2D;&#x3002;</p>
<p>&#x4F8B;&#x5982;&#x5728; <code>source/_data</code> &#x6587;&#x4EF6;&#x5939;&#x4E2D;&#x6DFB;&#x52A0; <code>menu.yml</code></p>
<pre><code class="lang-bash">Home: /
Gallery: /gallery/
Archives: /archives/
</code></pre>
<p>&#x4F60;&#x53EF;&#x7528;&#x5728;&#x6A21;&#x677F;&#x4E2D;&#x4F7F;&#x7528;&#x5B83;&#x4EEC;&#xFF1A;</p>
<pre><code class="lang-bash">{% <span class="hljs-keyword">for</span> link <span class="hljs-keyword">in</span> site.data.menu %}
  &lt;a href=<span class="hljs-string">&quot;{{ link }}&quot;</span>&gt;{{ loop.key }}&lt;/a&gt;
{% endfor %}
</code></pre>
<h1 id="6-&#x670D;&#x52A1;&#x5668;">6. &#x670D;&#x52A1;&#x5668;</h1>
<h3 id="hexo-server">Hexo-server</h3>
<p>&#x5728;Hexo3&#x4E2D;&#xFF0C;&#x670D;&#x52A1;&#x5668;&#x6A21;&#x5757;&#x4ECE;&#x4E3B;&#x6A21;&#x5757;&#x4E2D;&#x5206;&#x5F00;&#x4E86;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x5B89;&#x88C5; <a href="https://github.com/hexojs/hexo-server" target="_blank">hexo-server</a> &#x6765;&#x4F7F;&#x7528;&#x5B83;&#x3002;</p>
<pre><code class="lang-bash">$ npm install hexo-server --save
</code></pre>
<p>&#x4E00;&#x65E6;&#x670D;&#x52A1;&#x5668;&#x5B89;&#x88C5;,&#x8FD0;&#x884C;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x542F;&#x52A8;&#x670D;&#x52A1;&#x5668;&#x3002;
&#x9ED8;&#x8BA4;&#x4F60;&#x7684;&#x7F51;&#x7AD9;&#x5C06;&#x4F1A;&#x8FD0;&#x884C;&#x5728; <code>http://localhost:4000</code>&#x3002;
&#x5F53;&#x670D;&#x52A1;&#x5668;&#x6B63;&#x5728;&#x8FD0;&#x884C;&#x65F6;,Hexo&#x5C06;&#x81EA;&#x52A8;&#x76D1;&#x63A7;&#x6587;&#x4EF6;&#x66F4;&#x6539;&#x548C;&#x66F4;&#x65B0;&#x3002;&#x4F60;&#x4E0D;&#x9700;&#x8981;&#x91CD;&#x65B0;&#x542F;&#x52A8;&#x670D;&#x52A1;&#x5668;&#x3002;</p>
<pre><code class="lang-bash">$ hexo server
</code></pre>
<p>&#x5982;&#x679C;&#x4F60;&#x60F3;&#x4FEE;&#x6539;&#x7AEF;&#x53E3;&#x6216;&#x9047;&#x5230; <code>EADDRINUSE</code> &#x9519;&#x8BEF;&#x3002;&#x60A8;&#x53EF;&#x4EE5;&#x6DFB;&#x52A0; <code>-p</code> &#x9009;&#x9879;&#x6765;&#x8BBE;&#x7F6E;&#x5176;&#x4ED6;&#x7AEF;&#x53E3;&#x3002;</p>
<pre><code class="lang-bash">$ hexo server -p 5000
</code></pre>
<h3 id="static-mode">Static Mode</h3>
<p>&#x5728;&#x9759;&#x6001;&#x6A21;&#x5F0F;&#x4E0B;,<code>public</code> &#x6587;&#x4EF6;&#x5939;&#x7684;&#x76D1;&#x63A7;&#x7684;&#x7981;&#x7528;&#x7684;&#x3002;&#x4F60;&#x5FC5;&#x987B;&#x8FD0;&#x884C; <code>hexo generate</code> &#x4E4B;&#x524D;&#x542F;&#x52A8;&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x901A;&#x5E38;&#x7528;&#x4E8E;&#x751F;&#x4EA7;&#x73AF;&#x5883;&#x3002;</p>
<pre><code class="lang-bash">$ hexo server <span class="hljs-_">-s</span>
</code></pre>
<h3 id="custom-ip">Custom IP</h3>
<p>Hexo&#x8FD0;&#x884C;&#x670D;&#x52A1;&#x5668;&#x5728;&#x9ED8;&#x8BA4;0.0.0.0&#x3002;&#x4F60;&#x53EF;&#x4EE5;&#x8986;&#x76D6;&#x9ED8;&#x8BA4;&#x7684;IP&#x8BBE;&#x7F6E;</p>
<pre><code class="lang-bash">$ hexo server -i 192.168.1.1
</code></pre>
<h1 id="7-&#x751F;&#x6210;&#x5668;">7. &#x751F;&#x6210;&#x5668;</h1>
<p>Hexo&#x751F;&#x6210;&#x9759;&#x6001;&#x6587;&#x4EF6;&#x975E;&#x5E38;&#x7B80;&#x5355;&#x3001;&#x9AD8;&#x6548;&#x3002;</p>
<pre><code class="lang-bash">$ hexo generate
</code></pre>
<h3 id="&#x76D1;&#x542C;&#x6587;&#x4EF6;&#x4FEE;&#x6539;">&#x76D1;&#x542C;&#x6587;&#x4EF6;&#x4FEE;&#x6539;</h3>
<p>Hexo&#x7ACB;&#x5373;&#x53EF;&#x4EE5;&#x770B;&#x5230;&#x6587;&#x4EF6;&#x66F4;&#x6539;&#x5E76;&#x91CD;&#x65B0;&#x751F;&#x6210;&#x6587;&#x4EF6;&#x3002;Hexo&#x5C06;&#x6BD4;&#x8F83;SHA1&#x6821;&#x9A8C;&#x548C;&#x6587;&#x4EF6;&#x548C;&#x53EA;&#x5199;&#x6587;&#x4EF6;&#x7684;&#x6539;&#x53D8;&#x3002;</p>
<pre><code class="lang-bash">$ hexo generate --watch
</code></pre>
<h3 id="&#x90E8;&#x7F72;&#x540E;&#x751F;&#x6210;">&#x90E8;&#x7F72;&#x540E;&#x751F;&#x6210;</h3>
<p>&#x90E8;&#x7F72;&#x751F;&#x6210;&#x540E;,&#x60A8;&#x53EF;&#x4EE5;&#x8FD0;&#x884C;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x4E4B;&#x4E00;&#xFF0C;&#x8FD9;2&#x4E2A;&#x547D;&#x4EE4;&#x4F7F;&#x7528;&#x7ED3;&#x679C;&#x76F8;&#x540C;&#x3002;</p>
<pre><code class="lang-bash">$ hexo generate --deploy
$ hexo deploy --generate
</code></pre>
<h1 id="8-&#x90E8;&#x7F72;">8. &#x90E8;&#x7F72;</h1>
<p>Hexo&#x4E3A;&#x90E8;&#x7F72;&#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x4E2A;&#x5FEB;&#x901F;&#x3001;&#x7B80;&#x5355;&#x7684;&#x65B9;&#x6CD5;&#x3002;&#x4F60;&#x53EA;&#x9700;&#x8981;&#x4E00;&#x4E2A;&#x547D;&#x4EE4;&#x5C06;&#x7F51;&#x7AD9;&#x90E8;&#x7F72;&#x5230;&#x670D;&#x52A1;&#x5668;&#x3002;</p>
<pre><code class="lang-bash">$ hexo deploy
</code></pre>
<p>&#x5728;&#x6211;&#x4EEC;&#x5F00;&#x59CB;&#x4E4B;&#x524D;,&#x4F60;&#x5FC5;&#x987B;&#x5728; <code>_config.yml</code> &#x4FEE;&#x6539;&#x8BBE;&#x7F6E;&#x3002;&#x4E00;&#x4E2A;&#x6709;&#x6548;&#x7684;&#x90E8;&#x7F72;&#x8BBE;&#x7F6E;&#x5FC5;&#x987B;&#x6709; <code>type</code> &#x5B57;&#x6BB5;&#x3002;&#x4F8B;&#x5982;:</p>
<pre><code class="lang-yml"><span class="hljs-attr">deploy:</span>
<span class="hljs-attr">  type:</span> git
</code></pre>
<p>&#x4F60;&#x53EF;&#x7528;&#x540C;&#x65F6;&#x90E8;&#x7F72;&#x5230;&#x591A;&#x4E2A;<code>type</code>&#xFF0C;Hexo&#x5C06;&#x4F9D;&#x6B21;&#x6267;&#x884C;&#x6BCF;&#x4E2A;&#x90E8;&#x7F72;&#x3002;</p>
<pre><code class="lang-yml"><span class="hljs-attr">deploy:</span>
<span class="hljs-attr">- type:</span> git
<span class="hljs-attr">  repo:</span>
<span class="hljs-attr">- type:</span> heroku
<span class="hljs-attr">  repo:</span>
</code></pre>
<h3 id="git">Git</h3>
<p>&#x5B89;&#x88C5; <a href="https://github.com/hexojs/hexo-deployer-git" target="_blank">hexo-deployer-git</a></p>
<pre><code class="lang-bash">$ npm install hexo-deployer-git --save
</code></pre>
<p>&#x7F16;&#x8F91;&#x8BBE;&#x7F6E;&#xFF1A;</p>
<pre><code class="lang-yml"><span class="hljs-attr">deploy:</span>
<span class="hljs-attr">  type:</span> git
<span class="hljs-attr">  repo:</span> &lt;repository url<span class="hljs-string">&gt;
</span><span class="hljs-attr">  branch:</span> [branch]
<span class="hljs-attr">  message:</span> [message]
</code></pre>
<pre><code>| &#x9009;&#x9879;         | &#x63CF;&#x8FF0;|
| ----------- |---------------------------------------------|
| repo       | github&#x4ED3;&#x5E93;&#x5730;&#x5740; |
| branch    | &#x5206;&#x652F;&#x540D;&#x79F0; |
| message |&#x5B9A;&#x5236;&#x63D0;&#x4EA4;&#x6D88;&#x606F;(&#x9ED8;&#x8BA4;&#x4E3A; `Site updated: {{ now(&quot;YYYY-MM-DD HH:mm:ss&quot;) }}` )|
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="config.html" class="navigation navigation-prev " aria-label="Previous page: 各种配置详解">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../开发者指南.html" class="navigation navigation-next " aria-label="Next page: 开发者指南">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"开始写作吧","level":"1.5.3","depth":2,"next":{"title":"开发者指南","level":"1.6","depth":1,"path":"开发者指南.md","ref":"开发者指南.md","articles":[{"title":"git - 简明指南","level":"1.6.1","depth":2,"path":"git/guide.md","ref":"git/guide.md","articles":[]},{"title":"Jersey-2.x用户指南","level":"1.6.2","depth":2,"url":"https://waylau.gitbooks.io/jersey-2-user-guide/content/index.html","ref":"https://waylau.gitbooks.io/jersey-2-user-guide/content/index.html","articles":[]},{"title":"REST 实战","level":"1.6.3","depth":2,"url":"https://waylau.gitbooks.io/rest-in-action/content/","ref":"https://waylau.gitbooks.io/rest-in-action/content/","articles":[]},{"title":"Java Servlet 3.1 规范","level":"1.6.4","depth":2,"url":"https://github.com/waylau/servlet-3.1-specification","ref":"https://github.com/waylau/servlet-3.1-specification","articles":[]},{"title":"MyBatis中文指南","level":"1.6.5","depth":2,"url":"http://mybatis.github.io/mybatis-3/zh/index.html","ref":"http://mybatis.github.io/mybatis-3/zh/index.html","articles":[]},{"title":"Apache Shiro 用户指南","level":"1.6.6","depth":2,"url":"https://github.com/waylau/apache-shiro-1.2.x-reference","ref":"https://github.com/waylau/apache-shiro-1.2.x-reference","articles":[]},{"title":"Spring Boot参考指南","level":"1.6.7","depth":2,"url":"https://github.com/qibaoguang/Spring-Boot-Reference-Guide/blob/master/SUMMARY.md","ref":"https://github.com/qibaoguang/Spring-Boot-Reference-Guide/blob/master/SUMMARY.md","articles":[]},{"title":"Netty4 用户指南","level":"1.6.8","depth":2,"url":"https://github.com/waylau/netty-4-user-guide/blob/master/SUMMARY.md","ref":"https://github.com/waylau/netty-4-user-guide/blob/master/SUMMARY.md","articles":[]},{"title":"Google Java编程风格指南","level":"1.6.9","depth":2,"path":"user_guide/google-java8-guide.md","ref":"user_guide/google-java8-guide.md","articles":[]}]},"previous":{"title":"各种配置详解","level":"1.5.2","depth":2,"path":"hexo/config.md","ref":"hexo/config.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"hexo/writing.md","mtime":"2017-09-01T16:51:00.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-01T16:57:38.335Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

